<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{if mocod()=='index.main'}
	{conf index_title}
	{else}
	{echo ($this->Title != '') ? $this->Title.' - ' : (ini('cplace.cnpre.enabled') ? (logic('misc')->City('name').ini('settings.tuangou_str').' - ') : '')}{ini:settings.site_name}{conf page_title}
{/if}</title>
<meta name="Keywords" content="{~ini('settings.'.(mocod()=='index.main'?'index_':'').'meta_keywords')}" />
<meta name="Description" content="{~ini('settings.'.(mocod()=='index.main'?'index_':'').'meta_description')}{if $__p = productCurrentView()},{echo strip_tags($__p['intro'])}{/if}" />
    
    
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">

    <!--[if lte IE 8]>
    <!--{~ui('loader')->css('bootstrap-ie6.min')}-->
  	<![endif]-->
  	<!--[if lte IE 7]>
   <!--{~ui('loader')->css('ie')}-->
 	 <![endif]-->
 	  <link href="http://cdn.bootcss.com/fotorama/4.6.2/fotorama.css" rel="stylesheet">
    <!--{~ui('loader')->css('common_bak')}-->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
     <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
   <script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
   <script src="http://cdn.bootcss.com/fotorama/4.6.2/fotorama.js"></script>
    <!--[if lte IE 7]>
   <!--{~ui('loader')->js('bootstrap-ie')}-->
  <![endif]-->
    {if false==DEBUG}
	{~ui('loader')->js('@error.clear')}
	{/if}
	
   
    {~'<base h'.'ref="'.ini('settings.site_url').'/" />'}
    <link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
    <div class="header-top">
    	<div class="container">
    	 <ul class="left-nav list-inline">
    	 	<li>
    	 	{eval $kf=ini('data.cservice')}
    	 	
                服务热线:<strong style="color: #C9033B;"> {$kf['phone']}</strong>   
            </li>
    	 </ul>
    	 <ul class="right-nav">
    	 <!--{if MEMBER_ID > 0}-->
    	 <li class="nav-item">欢迎您，{MEMBER_NAME}</li>
    	 <li class="nav-item"><a href="?mod=account&code=logout">退出</a></li>
    	 {if $this->MemberHandler->HasPermission('index',"",1) === true}
		 <li class="nav-item"><a href="admin.php" target="_blank">管理后台</a></li>
		 {/if} 
		 {if MEMBER_ROLE_ID==6}
		 <li class="nav-item"><a href="?mod=seller">商家管理</a></li>
		 {/if} 
		 <li class="nav-item dropdown">
		 <a href="#" class="dropdown-toggle" data-toggle="dropdown">我的{TUANGOU_STR}<span class="caret"></span></a>
		  <ul class="dropdown-menu">
          	<li><a href="?mod=me&code=coupon">我的{TUANGOU_STR}券</a></li>
		  	<li><a href="?mod=me&code=order">我的订单</a></li>
		  	<li><a href="?mod=me&code=bill">收支明细</a></li>
		  	<li><a href="?mod=me&code=favorite">我的收藏</a></li>
		  	<li><a href="?mod=me&code=setting">账户设置</a></li>
		  	<li><a href="?mod=me&code=address">收货地址</a></li>
		  	<li><a href="?mod=recharge">账户充值</a></li>
		  	<li><a href="?mod=me&code=credit">我的积分</a></li>
		  </ul>
		 </li>
    	 <!--{else}-->
    	 <li class="nav-item">您好！欢迎您的到来。</li>
    	 <li class="nav-item"><a href="?mod=account&code=login">登录</a></li>
    	 <li class="nav-item"><a href="?mod=account&code=register">注册</a></li>
    	 <!--{/if}-->
    	 </ul>
    	</div>
    </div>
    <!-- bannerAD -->
    <section>
    <div class="container-fluid">
    
{if (logic('misc')->City('name')=="新乡")}
<div style="width:1000px;margin:5px auto;position: relative;clear: both;" id="bannerAD">
<a href="/zhuanti" target="_blank">
<img class="img-responsive" {echo 'sr'.'c="'.ini('settings.site_url').'/templates/xqw/images/banner.jpg"'} /></a>
<a onclick='$("#bannerAD").slideToggle();' class="close-btn" href="javascript:void(0);" title="关闭"></a>
</div>
{elseif (logic('misc')->City('name')=="北京")}
<div style="width:1000px;margin:5px auto;position: relative;clear: both;" id="bannerAD">
<a href="/lottery" target="_blank">
<img class="img-responsive" src="http://pic.yupoo.com/xq517/E5dDpKuG/e6coM.jpg"/></a>
<a onclick='$("#bannerAD").slideToggle();' class="close-btn" href="javascript:void(0);" title="关闭"></a>
</div>
{/if}

    </div>
    </section>
<!-- bannerAD -->

<header >
<div class="container">
	<div class="header-website">
		<div class="brand-logo">
			 <a href="./"><img src="templates/default/images/logo.png" /></a>
		</div>
		
		<div class="header-city">
			<div class="current-city font16"><strong>全国</strong></div>
			<div class="qiehuan-city"><a class="city-info__toggle"  href="/home/citylist">切换城市</a></div>
		</div>
		<div class="search-box">
			<div class="dropdown search-box__tabs-container">
			<span class=" dropdown-toggle" data-toggle="dropdown" data-type="product" id="search-type">商品<span class="caret"></span></span>
	           <ul class="dropdown-menu search-box__tab">
	          	<li><a  href="javascript:void(0)" onclick="front_search_select('product')">商品</a></li>
			  	<li><a  href="javascript:void(0)" onclick="front_search_select('seller')">商家</a></li>
		  	
		  		</ul>
			
			</div>
			<input type="text" name="w" autocomplete="off" id="search-txt" class="search-box__input" value="{$kw}" {if $_GET['mod']=='seller'}placeholder="请输入商家名称"{else}placeholder="请输入商品名称"{/if} onkeyup="if (event.keyCode == 13) front_search_request();">
			<button type="button" class="btn btn-lg btn-primary search-button" onclick="front_search_request()">搜索</button>
		</div>
		
	</div>
</div>
</header>
	
<nav  role="navigation" class="navbar navbar-primary">
	<div class="container">
		<!-- <div class="navbar-header">
	       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
	      
	    </div> -->
		   <div class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-primary">
				{loop $this->Config['__navs'] $i $nav}
<li><a href="{$nav['url']}" title="{$nav['title']}" target="{$nav['target']}" class="{$nav['class']}">{$nav['name']}</a></li>
{/loop}
					 
				
				</ul>
	      		
	      </div>
	</div>
</nav >
	
<select class="form-control">
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
  <option>5</option>
</select>

<div class="container-fluid">

</div>



	<script type="text/javascript">

			var front_seller_base = "{echo logic('url')->create('seller', array('mod' => 'seller', 'kw' => 'xqw'))}";
			var front_product_base = "{echo logic('url')->create('search', array('mod'=>'search','kw' => 'xqw'))}";
			var front_search_base = "";
			function front_search_request(){
				front_search_select($('#search-type').data('type'));
				window.location = front_search_base.replace('xqw', encodeURIComponent($('#search-txt').val()));
			}
			function front_search_select(val){
				
				if(val=='product'){
					front_search_base = front_product_base;
					$('#search-txt').attr('placeholder','请输入商品名称等');
					$('#search-type').data('type','product');
					$('#search-type').text("商品");
				}else{
					front_search_base = front_seller_base;
					$('#search-txt').attr('placeholder','请输入商家名称等');
					$('#search-type').data('type','seller');
					$('#search-type').text("商家");
				}
			}
		</script>
  
  </body>
</html>
